<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Edit User</title>
        <ui:include src="../header.xhtml"/>
    </h:head>
    <h:body>
        <f:view>
            <h:form>
                <h1><h:outputText value="Edit User"/></h1>
                <h:panelGrid columns="2">
                    <h:outputLabel value="Name:" for="name" />
                    <h:inputText id="name" value="#{managerManagedBean.selectedUser.name}" title="Name" required="true" requiredMessage="The Name field is required."/>
                    <h:outputLabel value="Password:" for="password" />
                    <h:inputText id="password" value="#{managerManagedBean.selectedUser.password}" title="Password" required="true" requiredMessage="The Password field is required."/>
                    <h:outputLabel value="Surname:" for="surname" />
                    <h:inputText id="surname" value="#{managerManagedBean.selectedUser.surname}" title="Surname" required="true" requiredMessage="The Surname field is required."/>
                    <h:outputLabel value="Username:" for="username" />
                    <h:inputText id="username" value="#{managerManagedBean.selectedUser.username}" title="Username" required="true" requiredMessage="The Username field is required."/>
                    <h:commandButton value="Edit" action="#{managerManagedBean.editUser}"/>
                </h:panelGrid>
            </h:form>
        </f:view>
    </h:body>
</html>

